package com.neusoft.neuiotms.dcom.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.neusoft.bizcore.web.jpa.model.AbstractAuditModel;
import com.neusoft.bizcore.web.jpa.model.Comment;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @see 移交服务周报
 */

@Getter
@Setter
@ToString
@Entity
@org.hibernate.annotations.Table(appliesTo = "neuiot_transfer_weekly", comment = "移交服务周报表")
@Table(name = "neuiot_transfer_weekly", uniqueConstraints = @UniqueConstraint(columnNames = {"unitCode", "weekTime" }))
public class TransferWeekly extends AbstractAuditModel {

    private static final long serialVersionUID = 3603884799103239682L;

    /** 编码 */
    @NotBlank(message = "编码不能为空")
    @Length(max = 255, message = "编码不能超过{max}位")
    @Column(length = 255, nullable = false)
    @Comment("varchar(255) NOT NULL COMMENT '编码'")
    private String code;

    /** 单位编码 */
    @NotBlank(message = "单位编码不能为空")
    @Length(max = 255, message = "单位编码不能超过{max}位")
    @Column(length = 255)
    @Comment("varchar(255) NOT NULL COMMENT '单位编码'")
    private String unitCode;

    /** 单位名称 */
    @NotBlank(message = "单位名称不能为空")
    @Length(max = 255, message = "单位名称不能超过{max}位")
    @Column(length = 255)
    @Comment("varchar(255) NOT NULL COMMENT '单位名称'")
    private String unitName;

    /** 用户编码 */
    //    @NotBlank(message = "用户编码不能为空")
    @Length(max = 255, message = "用户编码不能超过{max}位")
    @Column(length = 255)
    @Comment("varchar(255) NOT NULL COMMENT '用户编码'")
    private String userCode;

    /** 调研准备 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '调研准备'")
    private int survey;

    /** 初始化健康检查 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '初始化健康检查'")
    private int healthCheckup;

    /** 上门调研 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '上门调研'")
    private int dropIn;

    /** 单项完成进度 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '单项完成进度'")
    private int schedule;

    /** 调研资料整理 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '调研资料整理'")
    private int material;

    /** 完工时间 */
    @Column(nullable = true)
    private Date closingTime;

    /** 资产盘点 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '资产盘点'")
    private int assetInventory;

    /** 资产入库 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '资产入库'")
    private int assetWarehousing;

    /** 资产录入 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '资产录入'")
    private int assetEntry;

    /** 方案定制 */
    @Column(length = 8, nullable = false)
    @Comment("int(8) NOT NULL COMMENT '方案定制'")
    private int schemeCustomization;

    /** 总结描述 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '总结描述'")
    private String summaryDescription;

    /** 下周工作计划 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '下周工作计划'")
    private String workPlan;

    /** 问题记录及解决方案 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '问题记录及解决方案'")
    private String problemLog;

    /** 备注 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '备注'")
    private String remarks;

    /** 周次 */
    @NotNull
    @Column(nullable = false)
    private Date weekTime;

    /** 本周工作情况 */
    @Lob
    @Column(columnDefinition = "text")
    @Comment("text COMMENT '本周工作情况'")
    private String weekDescription;

}
